package com.zhentao.day01;

public class Exp1 {
  int age1 ;

  // 当全局应是与局部变量同名时, 则用this.变量名来表示全局变量。
  public void setAge(int age1) {
    this.age1 = age1 ;
  }

  public static void main(String[] args) {
    Exp1 exp1 = new Exp1() ;
    Exp1 exp2 = new Exp1() ;
    exp1.setAge(18);
    exp2 = exp1 ;
    System.out.println(exp2.age1); //

  }
}
